/*
 * TODO: Description
 *
 * Copyright (C) 2010 Johan Waldeback
 *  
 * This file is part of the OpenFMS project (http://www.openfms-project.org)
 * 
 * OpenFMS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "MockModel.h"
#include "Testing.h"
using namespace OpenFms;


ModelSimulator_environment_t environment =  {
	sizeof(ModelSimulator_environment_t), 111.f, 222.f, 333.f, 444.f, 555.f, 666.f,
	{ -1.2f, 0.33f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}};
	ModelSimulator_forces_t forces = {sizeof(ModelSimulator_forces_t)};
MockModel model;

BEGIN_TESTING()

	bool model_step_retrun = model.step( environment, forces );

	UNITTEST_BOOL_EQUALS( true, model_step_retrun )
	UNITTEST_FLOAT_EQUALS( 0.123f, forces.force_x )
	UNITTEST_FLOAT_EQUALS( -1.2f, forces.force_y )
	UNITTEST_FLOAT_EQUALS( sin(0.33f*3.14f), forces.force_z )
	UNITTEST_FLOAT_EQUALS( 111.f, forces.torque_x )
	UNITTEST_FLOAT_EQUALS( 222.f, forces.torque_y )
	UNITTEST_FLOAT_EQUALS( 333.f, forces.torque_z )

END_TESTING()






